 
<title>巡检计划</title> 
<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
    <a>设备巡检</a>
    <a><cite>设备计划</cite></a>
    </div>
</div> 
<div class="main">  
    <button type="button" class="layui-btn layui-btn-normal addbtn">
    <i class="layui-icon">&#xe608;</i> 新增计划</button> 
    <div class="headsearch">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">计划名称</label>
                <div class="layui-input-block">
                <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">计划编号</label>
                <div class="layui-input-block">
                <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">计划状态</label>
                <div class="layui-input-block">
                <select name="city" lay-verify="required">
                    <option value=""></option>
                    <option value="0">北京</option>
                    <option value="1">上海</option>
                    <option value="2">广州</option>
                    <option value="3">深圳</option>
                    <option value="4">杭州</option>
                </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">计划时间</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" id="test1">
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">位置范围</label>
                <div class="layui-input-block">
                <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="searchobtns">
              <button type="button" class="layui-btn layui-btn-normal search">
                  <i class="layui-icon layui-icon-search" style="height: 16px;"></i>
                  查询</button>
            </div>
        </form>

    </div> 
    <div  style="position: absolute;top:188px;width: 96%;">  
        <table id="demo" lay-skin='nob' lay-even></table> 
        <div id="pagefy"></div> 
        <button type="button" class="layui-btn layui-btn-normal zwhilte addbtn">
            <i class="layui-icon">&#xe608;</i> 删除</button>
        <button type="button" class="layui-btn layui-btn-normal zwhilte addbtn blue">
            <i class="layui-icon">&#xe608;</i> 启用/停用</button>
        <button type="button" class="layui-btn layui-btn-normal zwhilte addbtn blue">
            <i class="layui-icon">&#xe608;</i> 时间/频率调整</button>

        <button type="button" class="layui-btn layui-btn-normal zwhilte addbtn blue">
            <i class="layui-icon">&#xe608;</i> 定制表头</button>
    </div>


    <div class="layui-form-item" pane="">
        <label class="layui-form-label">原始复选框</label>
        <div class="layui-input-block">
          <input type="checkbox" name="like1[write]" lay-skin="primary" title="写作" checked="">
          <input type="checkbox" name="like1[read]" lay-skin="primary" title="阅读">
          <input type="checkbox" name="like1[game]" lay-skin="primary" title="游戏" disabled="">
        </div>
    </div>

</div>
 
<script> 
layui.use(['table','laydate','layer'], function(){
    var table = layui.table; 
    var laydate = layui.laydate; 
    //执行一个laydate实例
    laydate.render({
    elem: '#pagefy', //指定元素
    limit:'10',
    count: 4 //数据总数，从服务端得到
    });

    var layer = layui.layer;  
    layer.tab({
  area: ['600px', '300px'],
  tab: [{
    title: 'TAB1', 
    content: '内容1'
  }, {
    title: 'TAB2', 
    content: '内容2'
  }, {
    title: 'TAB3', 
    content: '内容3'
  }]
});        
        //第一个实例
        table.render({
            elem: '#demo',
            height: 312,
            'lay-skin':"nob",
            style: 'background-color: #5FB878; color: #fff',
            even:true,
            skin: "nob",
            // ,url: '/demo/table/user/' //数据接口
            page: true ,//开启分页
            cols: [[ //表头
                {field: 'tc_plan_id', title: '序号', width:60,align:'center', fixed: 'left'}
                ,{field: 'tc_plan_name', title: '操作', width:100, align:'center',toolbar: '#barDemo'}
                ,{field: 'tc_plan_name', title: '计划名称',align:'center', width:100}
                ,{field: 'tc_plan_code', title: '计划编号',align:'center', width:100}
                ,{field: 'tc_plan_status', title: '计划状态',align:'center', width:100} 
                ,{field: 'sign', title: '上次巡检时间', align:'center',width: 125}
                ,{field: 'experience', title: '下次巡检时间',align:'center', width: 125}
                ,{field: 'tc_plan_start', title: '计划开始时间', align:'center',width: 125}
                ,{field: 'tc_plan_end', title: '计划结束时间',align:'center', width: 125}
                ,{field: 'tc_plan_frequency', title: '计划频率',align:'center', width:100}
                ,{field: 'tc_plan_area', title: '位置范围',align:'center', width: 100}
                ,{field: 'wealth', title: '总设备数', align:'center',width: 100}
            ]],
            data:[{
                tc_plan_id:'0',
                tc_plan_name:'日检',
                tc_plan_code:'201203123',
                tc_plan_status:'使用中',
                tc_plan_start:'2019-3-2',
                tc_plan_end:'2019-3-2',
                sign:'2019-3-2',
                experience:'2019-4-2',
                tc_plan_frequency:'使用中',
                tc_plan_area:'使用中',
                wealth:'4',  
            },{
                tc_plan_id:'0',
                tc_plan_name:'日检',
                tc_plan_code:'201203123',
                tc_plan_status:'使用中',
                tc_plan_start:'2019-3-2',
                tc_plan_end:'2019-3-2',
                sign:'2019-3-2',
                experience:'2019-4-2',
                tc_plan_frequency:'使用中',
                tc_plan_area:'使用中',
                wealth:'4',  
            } 
        ] 
        }); 
});

</script>

<script type="text/html" id="barDemo">
<img src="../../src/style/res/baobiao.png" alt="">
<img src="../../src/style/res/printing.png" alt="">
<img src="../../src/style/res/printing.png" alt=""> 
<!-- 这里同样支持 laytpl 语法，如： -->
{{#  if(d.auth > 2){ }}
  <a class="layui-btn layui-btn-xs" lay-event="check">审核</a>
{{#  } }}
</script>